#ifndef TASKMANAGER_H_
#define TASKMANAGER_H_

#include <wx/timer.h>
#include "../Oscar.h"
#include <vector>
#include "Task.h"
#include "TaskHandle.h"

namespace Impp
{

class Oscar;
class Task;

class TaskManager : public wxTimer
{
private:
	Oscar* oscar;
	std::vector<Task* > tasks;
	
public:
	TaskManager(Oscar* oscar);
	virtual ~TaskManager();
	
	void addTask(Task* task);
	Task* getTask(const TaskHandle & type, const qword & handle);
	Task* getTask(const TaskType & type);
	void getTasks(const TaskType & type, std::vector<Task*> & tasks);
	void deleteTask(Task* task);

private:
	void Notify();
};

}

#endif /*TASKMANAGER_H_*/
